Method, system, and apparatus for network device to access packet switched network

ABSTRACT

A method for a network device to access a packet switched network is applied to a system in which the network device accesses the packet switched network by connecting to PEs in an active-standby mode. The method includes: an active PE and a standby PE each sends a fault detection message to the network device through an interface connected to the network device; the active PE sets the state of the interface “up” and advertises a route to a remote PE if a fault detection response returned by the network device is received through the interface within a preset period; otherwise, the active PE sets the state of the interface to “down” , and withdraws the advertised route; and the standby PE sets the state of the interface to “up” and advertises another route to the remote PE after receiving a fault detection response through the interface connected to the network device.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Application No.PCT/CN2009/070067, filed on Jan. 7, 2009, which claims priority toChinese Patent Application No. 200810001013.5, filed on Jan. 10, 2008,both of which are hereby incorporated by reference in their entireties.

TECHNICAL FIELD

The present invention relates to network technologies, and inparticular, to a method, a system, and an apparatus for a network deviceto access a packet switched network, such as Internet Protocol (IP)network or Multi-Protocol Label Switching (MPLS) network (which ishereinafter referred to as “IP/MPLS network”).

BACKGROUND

Currently, networks are developing rapidly. In any scenario, serviceproviders strive to simplify the device, reduce device costs and devicemanagement costs, and improve the speed of service convergence in thecase of failover.

In the prior art, a Next Generation Network (NGN) accesses a ProviderEdge Router (PE) of the IP/MPLS network directly in an active-standbymode. The details about how an NGN device accesses the IP/MPLS networkin an active-standby mode in the prior art are described below, taking aMultimedia Gateway (MGW) among NGN devices as an example.

FIG. 1 shows how an MGW accesses an IP/MPLS network in the prior art. Asshown in FIG. 1, the MGW works in an active-standby mode, and isdirectly connected with two PEs (PE 1 and PE2) of the IP/MPLS network.The active port on the MGW is connected with PE1 through active link 1and active link 2, and the standby port is connected with PE2 throughstandby link 3 and standby link 4. Link 3 is a standby link of link 1,and link 4 is a standby link of link 2. Each active link and itscorresponding standby link have the same IP address. Normally, thestandby port of the MGW does not work, namely, does not receive or sendmessages. Therefore, standby links do not receive or send data streams.The active port of the MGW sends Address Resolution Protocol (ARP)request messages to PE1 periodically through the active link, and PE1returns ARP response messages after receiving the ARP request messages.If the MGW does not receive the ARP response message from PE1 within apreset time, the MGW determines that the active link fails and triggersactive-standby failover. That is, the standby port changes to an activeport, and the standby link changes to an active link.

Virtual Router Redundancy Protocol (VRRP) and Virtual Private LANSegment (VPLS) are applied on PEs. According to the VRRP, PE1 is set asan active device, PE2 is set as a standby device, and the interface IPaddress of PE1 is set as the virtual IP address of the VRRP. A loopbackboard is set inside the two PEs. That is, the active PE1 runs thephysical port of the VRRP, and sends a VRRP multicast messageperiodically. The VRRP multicast message is carried by a VPLS andflooded to the physical port that runs the VRRP on PE2. If the standbyPE receives no VRRP multicast message within three sending periods forsending VRRP multicast messages, the standby PE determines that theactive PE fails, and triggers VRRP active-standby failover and thestandby PE changes to a active PE. PE1 and PE2 are located in the samesubnet, and each advertises routes to a remote PE3, as shown by dottedlines in FIG. 1.

Normally, the MGW forwards traffic to PE1 through an active port and theactive link connected with the active port, and then PE1 forwards thetraffic to PE3 or another PE through an IP/MPLS network.

Part of the return traffic sent from PE3 to PE1 through a routeadvertised by PE1 is directly forwarded to the MGW through the activelink, as shown by the bidirectional arrow in FIG. 1.

Part of the return traffic sent from PE3 to PE2 through a routeadvertised by PE2 is transmitted to PE1 transparently through a VPLSnetwork between PE2 and PE1, and then forwarded to the MGW through theactive link, because the MGW standby interface connected with PE2 isunable to receive or send traffic, as shown by the unidirectional arrowin FIG. 1.

When the MGW detects that an active link fails, for example, active link1 fails, the MGW triggers active-standby failover. And, the active portconnected with active link 1 changes to a standby port, the old activelink changes to a standby link which will not receive or send data anymore, the standby port connected with standby link 3 changes to anactive port, and the old standby link changes to an active link whichbegins receiving and sending messages. In this case, PE1 and PE2 stillwork normally, and the VRRP does not trigger active-standby failover.FIG. 2 shows how an MGW accesses an IP/MPLS network when active link 1fails in the prior art. As shown in FIG. 2, the MGW sends traffic to PE2through the active port and link 3. Because the VRRP does not triggeractive-standby failover after the active-standby failover of the MGW,and PE2 is still standby, PE2 transmits the received traffic to theL3VPN (Layer 3 Virtual Private Networks) port of PE1 transparentlythrough the VPLS network via L3VPN port of PE2, and then PE1 forwardsthe traffic to PE3 or other PEs.

Part of the return traffic sent from PE3 to PE2 through the routeadvertised by PE2 is forwarded to the MGW through the active link afterfailover and the active port after failover, as shown by thebidirectional arrow in FIG. 2.

Part of the return traffic sent from PE3 to PE1 through the routeadvertised by PE1 is transmitted to PE1 transparently through the VPLSnetwork between PE2 and PE1 and then forwarded to the MGW through theactive link after failover and the active port because the old activeport after failover has changed to a standby port which will not receiveor send messages any more, as shown by the unidirectional arrow in FIG.2.

As described above, in the prior art, the MGW sends ARP detectionmessages to PE1, and receives ARP response messages returned by PE1 todetect the fault of the active link, and detects fault of the PE throughVRRP.

If the physical link between PE1 and PE2 fails, normally PE2 is unableto forward the traffic received from the remote PE to PE1; afteractive-standby failover of the MGW, PE1 is unable to forward the trafficreceived from the remote PE to PE2, thus causing serious loss of servicepackets.

When the active link fails, the MGW undergoes active-standby failover.However, because PE1 does not fail, neither PE1 nor PE2 undergoesactive-standby failover. Therefore, the sent traffic and a part of thereturn traffic need to be forwarded through active PE1, which increasesthe traffic forwarding time and slows down the service convergence.

Moreover, in the prior art, when the network device accesses the IP/MPLSnetwork through a PE, a loopback board needs to be configured on the PEin order to run the VRRP and the VPLS, and therefore, the PE is rathercomplicated. In order to improve the reliability of the VPLS, twophysical links need to be configured between PE1 and PE2 to ensuretransparent transmission of the traffic of the VPLS network. Thatincreases the device costs, probability of faults of the whole system,and device management costs.

Such problems also occur on other network devices which access thepacket switched network in an active-standby mode.

SUMMARY

The embodiments of the present invention provide a method for a networkdevice to access a packet switched network to reduce loss of servicepackets in the case of failover.

The embodiments of the present invention provide a system for a networkdevice to access a packet switched network to reduce loss of servicepackets in the case of failover.

The embodiments of the present invention provide a PE to reduce loss ofservice packets in the case of failover.

The embodiments of the present invention provide a network device toreduce loss of service packets in the case of failover.

The objectives of the present invention are fulfilled through thefollowing technical solution:

A method for a network device to access a packet switched network, themethod is applied to a system in which the network device accesses thepacket switched network by connecting to PEs in an active-standby mode.The method includes:

by an active PE, sending a fault detection message to the network devicethrough the active PE's interface connected to the network device; by anstandby PE, sending a fault detection message to the network devicethrough the standby PE's interface connected to the network device;

by the active PE, setting the state of the active PE's interfaceconnected to the network device to “up” and advertising a route to aremote PE if determining that a fault detection response is receivedthrough the active PE's interface connected to the network device withina preset period; setting the state of the active PE's interfaceconnected to the network device to “down” and withdrawing the routeadvertised to the remote PE if determining that a fault detectionresponse is not received through the active PE's interface connected tothe network device within a preset period; and

by the standby PE, setting the state of the standby PE's interface to“up” and advertising another route to the remote PE after receiving thefault detection response through the standby PE's interface connected tothe network device.

A method for a network device to access a packet switched network, themethod is applied to a system in which the network device accesses thepacket switched network by connecting to PEs in an active-standby mode.The method includes:

by the network device, returning a fault detection response to an activePE if determining that a fault detection message sent by the active PEis received through an active port within a preset period; or

changing a standby port corresponding to the active port over to anactive port if determining that a fault detection message sent by theactive PE is not received through the active port within a presetperiod; receiving the fault detection message sent by the standby PEthrough the active port after failover, and returning a fault detectionresponse to the standby PE through the active port after failover.

A system for a network device to access a packet switched network isprovided in an embodiment of the present invention, where the networkdevice accesses the packet switched network by connecting to PEs in anactive-standby mode. The system includes a network device, an active PEand a standby PE, wherein:

the network device is configured to: return a fault detection responseto the active PE if determining that a fault detection message sent bythe active PE is received from an active port within a preset period;change a standby port corresponding to the active port over to an activeport if determining that a fault detection message sent by the active PEis not received from an active port within a preset period; receive thefault detection message sent by the standby PE through the active portafter failover, and return a fault detection response to the standby PEthrough the active port after failover;

the active PE is configured to: send the fault detection message to thenetwork device through the active PE's interface connected to thenetwork device; and set the state of the active PE's interface connectedto the network device to “up” and advertise a route to a remote PE ifdetermining that a fault detection response is received through theactive PE's interface connected to the network device within a presetperiod; set the state of the active PE's interface connected to thenetwork device to “down” and withdraw the route advertised to the remotePE if determining that a fault detection response is not receivedthrough the active PE's interface connected to the network device withina preset period; and

the standby PE is configured to: send the fault detection message to thenetwork device through the standby PE's interface connected to thenetwork device; and set the state of the standby PE's interfaceconnected to the network device to “up” and advertise another route tothe remote PE after receiving the fault detection response through thestandby PE's interface.

A PE is provided in an embodiment of the present invention. The PEincludes a fault detecting module, an interface state setting module anda route advertising module, wherein:

the fault detecting module is configured to: send a fault detectionmessage to the network device through the PE's interface connected tothe network device; and notify the interface state setting module thatthe interface state setting module needs to set the state of the PE'sinterface connected to the network device to “up” and notify the routeadvertising module that the route advertising module needs to advertisea route to a remote PE after receiving a fault detection response sentby the network device;

the interface state setting module is configured to set the state of thePE's interface connected to the network device to “up” under control ofthe fault detecting module; and

the route advertising module is configured to advertise the route to theremote PE under control of the fault detecting module.

A network device is provided in an embodiment of the present invention.The network device includes a fault detecting module and anactive-standby failover module, wherein:

the fault detecting module is configured to: return a fault detectionresponse to an active PE if determining that a fault detection messagesent by the active PE is received from an active port within a presetperiod; notify the active-standby failover module that theactive-standby failover module needs to perform active-standby failoverif determining that a fault detection message sent by the active PE isnot received from an active port within a preset period; receive thefault detection message sent by the standby PE through the active portafter failover, and return the fault detection response to the standbyPE; and

the active-standby failover module is configured to change the standbyport corresponding to the active port over to an active port undercontrol of the fault detecting module.

In the technical solution under the present invention, the active PE isconnected to the active port of the network device, and the standby PEis connected to the standby port of the network device. Each of theactive PE and the standby PE sends a fault detection messages to thenetwork device through its interface connected to the network device;the active PE or the standby PE sets the state of its interfaceconnected to the network device to “up” and advertise a route to theremote PE if a fault detection response is received from the networkdevice through its interface connected to the network device within thepreset period. The active PE or the standby PE sets the state of itsinterface connected to the network device to “down” and withdraws theroute advertised to the remote PE if a fault detection response is notreceived from the network device through its interface connected to thenetwork device within the preset period. Therefore, the technicalsolution under the present invention brings the following benefits:

(1) When the state of the outgoing interface connected to the networkdevice is up (the outgoing interface is an interface of a PE), the PEadvertises a route to the remote PE; when the state of the outgoinginterface connected to the network device changes to a “down” state, thePE withdraws the route advertised to the remote PE. In this way, theremote PE can send a returned traffic to a PE connected to the activeport of the network device directly in normal circumstances or aftercompletion of failover, and the traffic does not need to be forwardedbetween PEs, thus reducing loss of service packets in the case of linkfailure between the PEs.

(2) The PE sends a fault detection message to the network device, andthe network device judges whether the active link and the PE fail. Inthis way, the detection mechanism replaces the VRRP detection that isused on the PE in the prior art. Therefore, when the active link failsand the MGW undergoes active-standby failover, the state of the outgoinginterface of the PE is linked with the active-standby failover of theMGW, and the advertising of the route is controlled. When faults occur,the traffic sent to the packet switched network and the traffic returnedfrom the remote PE are forwarded only through the PE connected to theactive port of the MGW, thus shortening the traffic forwarding time andspeeding up the service convergence.

(3) In the embodiments of the present invention, the fault detectionbetween the PE and the network device replaces the VRRP detectionbetween the PEs, the PE does not need to run the VRRP and the VPLSconcurrently, and no loopback board is required, thus simplifying thedevice and reducing the costs of configuring and managing the PEs.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows how an MGW accesses an IP/MPLS network in the prior art;

FIG. 2 shows how an MGW accesses an IP/MPLS network when active link 1fails in the prior art;

FIG. 3 shows how an MGW accesses an IP/MPLS network in an embodiment ofthe present invention;

FIG. 4 shows how an MGW accesses an IP/MPLS network when the active linkfails in an embodiment of the present invention; and

FIG. 5 shows a structure of a system for a network device to access anIP/MPLS network in an embodiment of the present invention.

DETAILED DESCRIPTION

The present invention is elaborated below with reference to theaccompanying drawings and exemplary embodiments.

In a method for a network device to access a packet switched network inan embodiment of the present invention, an active PE is connected to theactive port of the network device and a standby PE is connected to thestandby port of the network device. Each of the active PE and thestandby PE sends fault detection messages to the network device throughits interface connected to the network device. The active PE sets thestate of the active PE's interface connected to the active port of thenetwork device to “up” and advertises a route to a remote PE if a faultdetection response returned by the network device is received throughthe active PE' s interface connected to the active port of the networkdevice within a preset period; if a fault detection response returned bythe network device is not received through the active PE's interfaceconnected to the active port of the network device within a presetperiod, the active PE sets the state of the active PE's interfaceconnected to the active port of the network device to “down”, andwithdraws the route advertised to the remote PE. The standby PE sets thestate of the standby PE's interface connected to the standby port of thenetwork device to “up” and advertises another route to the remote PEafter receiving a fault detection response through the standby PE'sinterface connected to the standby port of the network device.

The method in an exemplary embodiment of the present invention isdetailed below, assuming that the network device is an MGW.

FIG. 3 shows how an MGW accesses an IP/MPLS network in an embodiment ofthe present invention. As shown in FIG. 3, the MGW works in anactive-standby mode, and is directly connected with two PEs (PE 1 andPE2) of the IP/MPLS network. The active port on the MGW is connectedwith PE1 through active link 1 and active link 2, and the standby porton the MGW is connected with PE2 through standby link 3 and standby link4. Link 3 is a standby link of active link 1, and link 4 is a standbylink of active link 2. The standby port of the MGW does not work,namely, does not receive or send messages. Therefore, standby links donot receive or send of traffic.

When the MGW and PE1 begin to work normally, taking active link 1 as anexample, PE1 sends fault detection messages to the MGW periodicallythrough active link 1, and the MGW returns a fault detection responseafter receiving the fault detection message through the active portcorresponding to the active link 1. If PE1 receives the fault detectionresponse within a preset period such as three periods of faultdetection, PE1 sets the state of its outgoing interface (namely, theinterface connected to the active port of the MGW through active link 1)to “up”, and sends route 1 directed to the MGW (shown by the dotted linein FIG. 3) to the remote PE.

PE2 sends a fault detection message to the MGW periodically through thestandby link. Because the standby port of the MGW does not work, it isunable to receive the fault detection message, and unable to return afault detection response to PE2. PE2 receives no fault detection messagewithin a preset period such as three periods of fault detection, andtherefore, sets the state of its outgoing interface (namely, theinterface connected to the MGW through the standby link) to “down”, thussuppressing advertising of the route.

In the normal working process, PE1 receives the fault detection responsefrom the active link within the preset period, and performs no actions,namely, keeps the “up” state of the outgoing interface that connects PE1with the active link. The MGW sends traffic to PE1 through the activeport and the active link, and PE1 forwards the traffic to the IP/MPLSnetwork. As regards the traffic returned from the remote PE, because PE2does not advertise any route to the remote PE, the remote PE has toroute the traffic to PE1 through route 1 advertised by PE1, and then PE1sends the traffic to the MGW through the active link and the active portof the MGW.

When the active link fails (for example, active link 1 fails), the MGWreceives no fault detection message through the active port connected tothe active link within the preset period, and therefore, perceives thatthe active link fails, and triggers failover from the old active port toa standby port and failover from the old standby port to an active port.Accordingly, the old active link changes over to a standby link, and theold standby link changes over to an active link.

FIG. 4 shows how an MGW accesses an IP/MPLS network when the active linkfails in an embodiment of the present invention. As shown in FIG. 4,after changing the old standby port over to an active port, the MGW canreceive the fault detection message sent by PE2 through the active linkafter failover, and return a fault detection response to PE2. Afterreceiving the fault detection response within the preset period, PE2sets the state of its outgoing interface (namely, the interface thatconnects PE2 with the active link after failover) to “up”, andadvertises route 1 corresponding to the active link after failover tothe remote PE, as shown by the dotted line in FIG. 4. After changing theold active port over to a standby port, the MGW is unable to receive thefault detection message sent by PE1 or return a fault detectionresponse. If not receiving the fault detection response from the MGWwithin a preset period, PE1 sets the state of its outgoing interface to“down”, and withdraws the route sent to the remote PE.

The MGW sends traffic to PE2 through the active port after failover, andPE2 forwards the traffic to the IP/MPLS network. As regards the trafficreturned from the remote PE, because the route advertised by PE1 iswithdrawn and a new route is advertised by PE2, the remote PE routes thereturned message to PE2 through the route advertised by PE2, and PE2sends the message to the MGW.

The fault detection mechanism between the MGW and the PE may be an ARPdetection mechanism, and the corresponding fault detection message is anARP request and the corresponding fault detection response is an ARPresponse. Once the PE receives an ARP response within the preset period,the PE sets the state of its outgoing interface (namely, the interfacethat connects PE with the link for receiving the ARP response) to “up”,and advertises a route to the remote PE. If no ARP response is receivedwithin the preset period, the PE sets the state of its outgoing to“down”, and withdraws the route advertised to the remote PE.

Alternatively, the fault detection mechanism between the MGW and the PEis a Bidirectional Forwarding Detection (BFD) mechanism, and thecorresponding processing is: The PE sends a BFD control message to theMGW periodically, and the MGW returns a BFD control message to the PE.After receiving the BFD control message, the PE negotiates with the MGWto create a BFD session, and sets the state of its outgoing interface to“up”. The state control for the outgoing interface and the process ofadvertising a route after state change in the BFD mechanism are the sameas those in the ARP fault detection mechanism.

Therefore, the fault detection of the link between the MGW and the PE islinked with the outgoing interface of the PE connected with the MGW, theactive/standby state of the PE is consistent with that of the MGW, boththe traffic sent to the remote PE and the traffic returned by the remotePE can be forwarded through the PE corresponding to the active port, andtherefore the traffic forwarding time is shortened, and the serviceconvergence is quickened.

Meanwhile, the ARP detection or BFD mechanism for the link between thePE and the MGW takes the place of the VRRP detection. Therefore, the PEperceives the fault more quickly, and the standby PE can change itsoutgoing interface state quickly with the active-standby failover of theMGW to control the route advertising. In this way, the loss of servicepackets in the case of failover is reduced.

In order to further reduce the loss of return traffic during failover,normally PE2 can advertise another route whose outgoing interface isNULL0 to PE1, for example, route 2 shown by the dotted line in FIG. 3and FIG. 4. Normally, route 2 stored in the routing table of PE1 is ofthe lowest priority. Therefore, route 2 is not selected for the returntraffic from the remote PE to PE1. However, once a fault occurs, theroute between PE1 and the MGW fails, and PE1 selects a valid route oflower priority. In this way, PE1 can forward the return traffic to PE2through route 2. PE2 forwards the traffic from PE1 to the MGW after theMGW undergoes active-standby failover and the standby link between theMGW and PE2 is available. In this way, the loss of service packetsduring failover is further reduced.

FIG. 5 shows a structure of a system for a network device to access anIP/MPLS network in an embodiment of the present invention. As shown inFIG. 5, the system includes a network device 510, an active PE 520, anda standby PE 530.

The network device 510 is configured to: return a fault detectionresponse to an active PE 520 if determining that a fault detectionmessage sent by the active PE 520 is received from an active port withina preset period; if determining that a fault detection message sent bythe active PE 520 is not received from an active port within a presetperiod, change a standby port corresponding to the active port over toan active port; receive the fault detection message sent by the standbyPE 530 through. the active port after failover, and return a faultdetection response to the standby PE 530 through the active port afterfailover.

The active PE 520 is configured to: send the fault detection message tothe network device 510 through its interface connected to the networkdevice 510; and set the state of the interface to “up” and advertise aroute to a remote PE if determining that a fault detection response isreceived through the interface within a preset period; set the state ofthe interface to “down”, and withdraw the route advertised to the remotePE if determining that a fault detection response is not receivedthrough the interface within a preset period.

The standby PE 530 is configured to: send the fault detection message tothe network device 510 through its interface connected to the networkdevice 510; and set the state of the interface to “up” and advertise aroute to the remote PE after receiving the fault detection responsereturned by the network device 510 through the interface.

The standby PE 530 is further configured to advertise another routewhose outgoing interface is NULL0 to the active PE 520. In this way,when the PE 520 determines that the active link fails, namely, if theactive PE 520 receives no fault detection response returned by thenetwork device 510 within a preset period, the active PE 520 sends thetraffic received from the remote PE to the standby PE 530 through theroute whose outgoing interface is NULL0, thus further reducing loss ofservice packets in the case of failover.

Specifically, the network device 510 includes an active-standby portfailover module 512 and a fault detecting module 511.

The fault detecting module 511 is configured to: return a faultdetection response to an active PE 520 if determining that a faultdetection message sent by the active PE 520 is received from an activeport within a preset period; if determining that a fault detectionmessage sent by the active PE 520 is not received from an active portwithin a preset period, notify the active-standby failover module 512that the active-standby failover module 512 needs to performactive-standby failover; receive the fault detection message sent by thestandby PE 530 through the active port after failover, and return thefault detection response.

The active-standby failover module 512 is configured to change thestandby port corresponding to the active port over to an active portunder control of the fault detecting module 511.

The active PE 520 includes a fault detecting module 521, an interfacestate setting module 523, and a route advertising module 522.

The fault detecting module 521 is configured to: send a fault detectionmessage to the network device 510 through the active PE 520's interfaceconnected to the network device 510; and notify the interface statesetting module 523 that the interface state setting module 523 needs toset the state of the interface to “up” and notify the route advertisingmodule 521 that the route advertising module 521 needs to advertise aroute to the remote PE if a fault detection response sent by the networkdevice 510 is received within a preset period; if a fault detectionresponse sent by the network device 510 is not received within a presetperiod, notify the interface state setting module 523 that the interfacestate setting module 523 needs to set the state of the interface to“down”, and notify the route advertising module 521 that the routeadvertising module 521 needs to withdraw the route advertised to theremote PE.

The interface state setting module 523 is configured to set the state ofthe interface to “up” or “down” under control of the fault detectingmodule 521.

The route advertising module 522 is configured to advertise a route tothe remote PE or withdraw the route advertised to the remote PE undercontrol of the fault detecting module 521.

Accordingly, the standby PE 530 includes a fault detecting module 531,an interface state setting module 533, and a route advertising module532.

The fault detecting module 531 is configured to: send a fault detectionmessage to the network device 510 through the standby PE 530's interfaceconnected to the network device 510; and notify the interface statesetting module 533 that the interface state setting module 533 needs toset the state of the interface to “up” and notify the route advertisingmodule 532 that the route advertising module 532 needs to advertise aroute to the remote PE after receiving a fault detection response sentby the network device 510.

The interface state setting module 533 is configured to set the state ofthe interface to “up” under control of the fault detecting module 531.

The route advertising module 532 is configured to advertise a route tothe remote PE under control of the fault detecting module 531.

The route advertising module 532 is further configured to send anotherroute whose outgoing interface is NULL0 to the active PE 520.

In the technical solution under the present invention, the PEs connectedto the active port and the standby port of the network device each sendsfault detection messages to the network device through the interfaceconnected to the network device; set the state of the interfaceconnected to the network device to “up” and advertise a route to theremote PE if a fault detection response is received from the networkdevice through the interface connected to the network device within thepreset period; set the state of the interface connected to the networkdevice to “down” and withdraw the route advertised to the remote PE if afault detection response is not received from the network device throughthe interface connected to the network device within the preset period.Therefore, the technical solution under the present invention brings thefollowing benefits:

(1) When the outgoing interface of PE connected to the network device isup, the PE advertises a route to the remote PE; when the outgoinginterface connected to the network device changes to a “down” state, thePE withdraws the route advertised to the remote PE. In this way, theremote PE can send the returned traffic to the PE connected to theactive port of the network device directly in normal circumstances orafter completion of failover, and the traffic does not need to beforwarded between PEs, thus reducing loss of service packets in the caseof link failure between the PEs.

(2) The PE sends a fault detection message to the network device, andthe network device judges whether the active link and the PE fail. Inthis way, the detection mechanism replaces the VRRP detection that isused on the PE in the prior art. Therefore, when the active link failsand the MGW undergoes active-standby failover, the outgoing interface ofthe PE and the advertised route are linked with the active-standbyfailover of the MGW. When faults occur, the traffic sent to the packetswitched network and the traffic returned from the remote PE are sent tothe PE connected to the active port of the network device directly, andforwarded by this PE, thus shortening the traffic forwarding time andspeeding up the service convergence.

(3) In the embodiments of the present invention, the fault detectionbetween the PE and the network device replaces the VRRP detectionbetween the PEs, the PE does not need to run the VRRP and the VPLSconcurrently, and no loopback board is required, thus simplifying thedevice and reducing the costs of configuring and managing the PEs.

(4) The VRRP fault detection in the prior art takes a long time, whichis generally 3 s. Through the VRRP, when the active PE fails, it takes along time for the standby PE to perceive the fault, and theactive-standby failover of the VRRP is slow, which leads to serious lossof service packets in the case of failover. By contrast, in theembodiments of the present invention, an ARP detection mechanism or BFDmechanism between the PE and the network device takes the place of theVRRP detection between the PEs. The fault detection time based on theARP detection mechanism or BFD mechanism is shorter than the faultdetection time based on VRRP. Therefore, when the active PE fails andthe MGW undergoes active-standby failover, the standby PE changes itsown outgoing interface to the “up” state immediately, thus improving thefailover speed of the PE and reducing loss of service packets in thecase of failover. Moreover, no VRRP link exists between the PEs, thuseliminating exception of active-standby failover.

(5) In the embodiments of the present invention, the standby PE sends aroute whose outgoing interface is NULL0 to the active PE. Therefore, inthe failover process, the message sent to the active PE can be forwardedto the standby PE through the route whose outgoing interface is NULL0,and forwarded by the standby PE to the network device after completionof the failover, thus further reducing loss of service packets in thefailover process.

After reading the foregoing embodiments, those skilled in the art areclearly aware that the present invention may be implemented throughhardware, or through software in addition to a necessary universalhardware platform. The technical solution under the present inventionmay be embodied as a software product. The software product may bestored in a non-volatile storage medium (such as CD-ROM, USB flash disk,or mobile hard disk) , and may include several instructions that enablea computer device (such as personal computer, server, or network device)to perform the methods provided in the embodiments of the presentinvention.

The above descriptions are merely exemplary embodiments of the presentinvention, but not intended to limit the scope of the present invention.Any modification, equivalent replacement, or improvement made withoutdeparting from the spirit and principle of the present invention shouldfall within the scope of the present invention.

1. A method for a network device to access a packet switched network,wherein the method is applied to a system in which the network deviceaccesses the packet switched network by connecting to Provider EdgeRouters (PEs) in an active-standby mode, and the method comprises:sending, by an active PE a fault detection message to the network devicethrough the active PE's interface connected to the network device;sending, by an standby PE a fault detection message to the networkdevice through the standby PE's interface connected to the networkdevice; returning, by the network device, a fault detection response toan active PE if determining that the fault detection message sent by theactive PE is received through an active port of the network devicewithin a preset period; or changing, by the network device, a standbyport of the network device corresponding to the active port over to anactive port if determining that the fault detection message sent by theactive PE is not received through the active port within the presetperiod, receiving a fault detection message sent by a standby PE throughthe active port after failover, and returning a fault detection responseto the standby PE through the active port after the failover; setting,by the active PE, a state of the active PE's interface connected to thenetwork device to “up” and advertising a first route to a remote PE ifdetermining that a fault detection response is received through theactive PE's interface connected to the network device within a presetperiod; setting the state of the active PE's interface connected to thenetwork device to “down”, and withdrawing the first route advertised tothe remote PE if determining that a fault detection response is notreceived through the active PE's interface connected to the networkdevice within the preset period; and setting, by the standby PE, thestate of the standby PE's interface to “up” and advertising a secondroute to the remote PE after receiving the fault detection responsethrough the standby PE's interface connected to the network device. 2.The method of claim 1, wherein: the fault detection message is anAddress Resolution Protocol (ARP) request and the fault detectionresponse is an ARP response; or the fault detection message and thefault detection response are Bidirectional Forwarding Detection (BFD)control messages.
 3. The method of claim 1, further comprising: sending,by the standby PE connected with the standby port of the network device,a third route whose outgoing interface is NULL0 to the active PEconnected with the active port of the network device.
 4. A method for anetwork device to access a packet switched network, wherein the methodis applied to a system in which the network device accesses the packetswitched network by connecting to Provider Edge Routers (PEs) in anactive-standby mode, and the method comprises: by the network device,returning a fault detection response to an active PE if determining thata fault detection message sent by the active PE is received through anactive port within a preset period; or changing a standby portcorresponding to the active port over to an active port if determiningthat a fault detection message sent by the active PE is not receivedthrough the active port within the preset period, receiving a faultdetection message sent by a standby PE through the active port afterfailover, and returning a fault detection response to the standby PEthrough the active port after the failover.
 5. The method of claim 4,wherein: the fault detection message is an Address Resolution Protocol(ARP) request and the fault detection response is an ARP response; orthe fault detection message and the fault detection response areBidirectional Forwarding Detection (BFD) control messages. 6-7.(canceled)
 8. A Provider Edge Router (PE), comprising a fault detectingmodule, an interface state setting module and a route advertisingmodule, wherein: the fault detecting module is configured to: send afault detection message to a network device through the PE's interfaceconnected to the network device; and notify the interface state settingmodule that the interface state setting module needs to set a state ofthe PE' s interface connected to the network device to “up”, and notifythe route advertising module that the route advertising module needs toadvertise a route to a remote PE after receiving a fault detectionresponse sent by the network device within a preset period; theinterface state setting module is configured to set the state of thePE's interface connected to the network device to “up” according tonotification of the fault detecting module; and the route advertisingmodule is configured to advertise the route to the remote PE accordingto the notification of the fault detecting module.
 9. The PE of claim 8,wherein: the fault detecting module is further configured to: notify theinterface setting module that the interface setting module needs to setthe state of the PE's interface connected to the network device to“down” and notify the route advertising module that the routeadvertising module needs to withdraw the route advertised to the remotePE if no fault detection response returned by the network device isreceived within the preset period; the interface state setting module isfurther configured to set the state of the PE's interface connected tothe network device to “down” according to the notification of the faultdetecting module; and the route advertising module is further configuredto withdraw the route advertised to the remote PE according to thenotification of the fault detecting module.
 10. The PE of claim 8,wherein: the PE is a standby PE, the route advertising module of thestandby PE is further configured to send another route whose outgoinginterface is NULL0 to a corresponding active PE.
 11. A network device,comprising a fault detecting module and an active-standby failovermodule, wherein: the fault detecting module is configured to: return afault detection response to an active Provider Edge Router (PE) ifdetermining that a fault detection message sent by the active PE isreceived from an active port within a preset period; notify theactive-standby failover module that the active-standby failover moduleneeds to perform active-standby failover if determining that a faultdetection message sent by the active PE is not received from an activeport within a preset period; receive a fault detection message sent by astandby PE through the active port after failover, and return the faultdetection response to the standby PE; and the active-standby failovermodule is configured to change a standby port corresponding to theactive port over to an active port under control of the fault detectingmodule.